import request from '@/utils/request.js'
/**
 * 获取用户频道列表
 */
export const getChannels = () => {
  const t = request({
    method: 'GET',
    url: '/app/v1_0/user/channels'
  })
  return t
}

export const getAllChannels = () => {
  return request({
    method: 'GET',
    url: '/app/v1_0/channels'
  })
}

export const addChannel = (channels) => {
  return request({
    method: 'PUT',
    url: '/app/v1_0/user/channels',
    data: {
      channels: channels
    }
  })
}

export const delChannel = (channelId) => {
  return request({
    url: '/app/v1_0/user/channels/' + channelId,
    method: 'DELETE'
  })
}
